<!DOCTYPE html>
<script src="../../../resources/testharness.js"></script>
<script src="../../../resources/testharnessreport.js"></script>
<input value="a">
<script>
test(() => {
  var input = document.querySelector('input');
  input.setAttribute('value', 'b');
  input.focus();
  input.select();
  eventSender.keyDown('a');
  var didDispatchChange = false;
  input.onchange = () => { didDispatchChange = true; }
  input.blur();
  assert_true(didDispatchChange);
}, 'crbug.com/659499: Updating INPUT value to the previous defaultValue should dispatch "change" event.');
</script>
